//
//  UIButton+Enxtension.swift
//  WeiBoItem
//
//  Created by jss on 16/4/17.
//  Copyright © 2016年 jss. All rights reserved.
//

import UIKit

extension UIButton {
    convenience init(title:String, imageName: String, textColor:UIColor, textFont: CGFloat){
        self.init()
        
        //设置button的相关属性
        self.setTitle(title, forState: .Normal)
        self.setBackgroundImage(UIImage(named: imageName), forState: .Normal)
        
        self.setTitleColor(textColor, forState: UIControlState.Normal)
        self.titleLabel?.font = UIFont.systemFontOfSize(textFont)
        
    }
    
    
}